package org.demo.api;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;


@Controller
@RequestMapping("/")
public class IndexController {

    @RequestMapping("/test")
    public @ResponseBody Map login(@RequestParam("json") String json) {
        System.out.println("json -- " + json);
        Map map = new HashMap();
        map.put("data", "123456");
        return map;
    }

}
